Home

Operator Usage

Name

TM-compress-stars

Description

Ket TM-compress-stars input-ket
the input-ket is split on the " " char
then consecutive "*" chars are compressed into a single ".."
the returned ket value is the number of "structure words" in the input text
the primary use for this operator is in TM-generate
this operator is a member of the Template Machine set of operators


Examples

-- the first example:
TM-compress-stars |* * * * man *>
    |.. man ..>

-- the second example:
TM-compress-stars |The * * * man *>
    2|The .. man ..>

-- another example, this time with more structure words:
TM-compress-stars |The * * man sat on * *>
    4|The .. man sat on ..>


See also

TM-generate, TM-ket-hash

Operator type

ket normal